package cn.wolfcode.luowowo.article.service;

import cn.wolfcode.luowowo.article.domain.Travel;
import cn.wolfcode.luowowo.article.domain.TravelContent;
import cn.wolfcode.luowowo.article.query.TravelQuery;
import cn.wolfcode.luowowo.article.vo.TravelStatisPersistenceVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * Created by LENOVO on 2019/8/12.
 */
public interface ITravelService {

    /**
     * 分页查询
     * @param qo
     * @return
     */
    PageInfo query(TravelQuery qo);


    /**
     * 添加/更新
     * @param travel
     */
    Long saveOrUpdate(Travel travel);

    /**
     * 查询所有
     * @return
     */
    List<Travel> list();

    /**
     * 查单个
     * @param id
     * @return
     */
    Travel get(Long id);

    /**
     * 查询阅读量前3
     * @param destId
     * @return
     */
    List<Travel> getTravelTop3(Long destId);

    /**
     * 查内容
     * @param id
     * @return
     */
    TravelContent getContent(Long id);

    /**
     * 修改游记状态
     * @param id
     * @param state
     */
    void updateState(Long id, int state);

    /**
     * 游记的定时跟新
     */
    void updateStatisVO(TravelStatisPersistenceVO vo);



}
